import {createRouter, createWebHistory} from 'vue-router'
import LoginPage from './components/LoginPage.vue'
import ClusterList from './components/ClusterList.vue'
import TaskList from "@/components/TaskList.vue";
import TaskDetail from "@/components/TaskDetail.vue";

const routes = [
    {path: '/', redirect: '/login'},
    {path: '/login', component: LoginPage},
    {path: '/clusters', component: ClusterList},
    {path: '/clusters/:app_id', component: TaskList},
    {path: '/clusters/:app_id/:task_id', component: TaskDetail},
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
